Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NUT-06: add urls field #175

Merged
merged 1 commit into from
Nov 6, 2024
Merged

NUT-06: add urls field #175

merged 1 commit into from
Nov 6, 2024

Conversation

prusnak
Copy link
Collaborator

@prusnak prusnak commented Oct 11, 2024

06.md Show resolved Hide resolved
@thesimplekid
Copy link
Collaborator

I think we should not just list urls but follow a struct more similar to the contact feild for examples:

{
  "endpoints": [
    {
      "method": "http",
      "endpoint": "https://fake.mint.dev"
    },
    {
      "method": "nostr",
      "endpoint": "nprofile1qs..."
    },
    {
      "method": "tor",
      "endpoint": "abcdefghijklmn.onion"
    }
  ]
}

@prusnak
Copy link
Collaborator Author

prusnak commented Oct 11, 2024

I think we should not just list urls but follow a struct more similar to the contact feild for examples:

🤷 URI schemes were invented exactly for this reason. I am just not a big fan of using JSON dicts and I think it would have been much better if contact field also used URI schemes instead of the abomination we have now. :-) That said I don't mind either way and I always prefer consistency over "correctness". If there is consensus to go with the JSON dict instead of the URI scheme, I will update the PR.

@ok300
Copy link
Contributor

ok300 commented Oct 31, 2024

TokenV4 has a field m for the mint URL: https://cashubtc.github.io/nuts/00/#token-format_1

Consider the following scenario:

Let's say mint Bob in accessible on 2 URLs. If Alice has a token for Bob's mint (with "Bob URL 1" embedded) and sends this token to Carol, then Carol will only have "Bob URL 1" to get to the mint. If the mint becomes unreachable on URL 1 but remains reachable on it's URL 2, Carol won't know the 2nd URL and won't be able to redeem it.

Is that true, or am I missing something?

The fix would be for TokenV4 to include all of Bob's known URLs, but that would mean making the token bigger (esp. with tor URLs).

@prusnak
Copy link
Collaborator Author

prusnak commented Nov 2, 2024

Consider the following scenario:

That is exactly what I described here: #62 (comment)

@thesimplekid
Copy link
Collaborator

thesimplekid commented Nov 6, 2024

Merged in cdk cashubtc/cdk#398

@prusnak
Copy link
Collaborator Author

prusnak commented Nov 6, 2024

Merged in nutshell cashubtc/nutshell#638

@prusnak prusnak requested a review from callebtc November 6, 2024 10:46
@thesimplekid
Copy link
Collaborator

ACK 6f55ebf

@prusnak prusnak merged commit 96891ac into main Nov 6, 2024
2 checks passed
@prusnak prusnak deleted the nut-06-urls branch November 6, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NUT-06: Mint should announce multiple endpoints that it is reachable from
3 participants